/*
 * @Autor: lingchen.liu
 * @Date: 2022-02-09 14:58:56
 * @LastEditors: lingchen.liu
 * @LastEditTime: 2022-02-09 16:26:00
 * @emial: lingchen.liu@bizfocus.cn
 */
import React, { FC, ReactElement } from 'react';
import '../../assets/css/common.scss';

interface IModal {
    isShowModal: boolean,
    modalTitle: string,
}

const Modal: FC<IModal> = ({ isShowModal, modalTitle, children }): ReactElement => {

    return (
        <>
            {
                isShowModal
                    ?
                    (
                        <div className='modal'>
                            <div className='inner'>
                                <div className='m-header'>{modalTitle}</div>
                                <div className='content-wrapper'>{children}</div>
                            </div>
                        </div>
                    )
                    :
                    ''
            }
        </>
    )
}

export default Modal